import { RequestConfig } from 'umi';
import errorHandler from "@/util/requestErrorHandle"

export const request: RequestConfig = {
  errorHandler,
  errorConfig: {
    adaptor: (resData) => {
      return {
        ...resData,
        success: resData.code == 0,
        errorMessage: resData.msg,
      };
    },
  },
};
